module.exports = {
  env: {
    NODE_ENV: '"development"'
  },
  defineConstants: {
  },
  mini: {},
  h5: {

    devServer: {
      port: 10086,
      host:'127.0.0.1',
    },
    output: {
      filename: 'js/[name].[hash:8].js',
      chunkFilename: 'js/[name].[chunkhash:8].js'
    },
    webpackChain (chain, webpack) {
      chain.merge({
        optimization: {
          splitChunks: {
            cacheGroups: {
              lodash: {
                name: 'lodash',
                priority: 1000,
                test (module) {
                  return /node_modules[\\/]lodash/.test(module.context)
                }
              }
            }
          }
        }
      })
      // chain.plugin('analyzer')
      // .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
    },
    // webpackChain (chain, webpack) {
    //   chain.merge({
    //     plugin: {
    //       install: {
    //         plugin: require('webpack-bundle-analyzer').BundleAnalyzerPlugin,
    //         args: [{
    //           analyzerMode: 'static',
    //           defaultSizes: 'gzip',
    //           analyzerPort: 8888
    //         }]
    //       }
    //     }
    //   })
    // }
  }
}
